<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    // 痛苦期
	{
		let b = 2;
		let username = "lisi";
		const obj = {
			// fn非简写形式：fn:function(){}
			fn(){

            },
            fn2:()=>{},
			[username]:200,// 将变量username的值作为属性名
			a:1,
            username,// 将变量的名字作为属性名，将变量的值作为属性值
            b,// 相当于 b:b
        }
		console.log(obj);// a username b
    }
</script>
</html>